(define load-module
  (lambda (path module-ok-cb)
    (define ml (mx.modules.ModuleLoader.))
    (.url$ ml path)
    (.applicationDomain$ ml application-domain)
    (.addEventListener
     ml "ready"
     (lambda (ev)
       (module-ok-cb (.child$ ml))))
    (.addEventListener
     ml "error"
     (lambda (ev)
       (mx.controls.Alert.show (.toString ev))))
    (.loadModule ml)))

(define inspect
  (lambda (o)
    (kbs.inspector.Inspect.inspect workspace o)))
